package com.lekang;



import lombok.Data;

@Data
public class R {
    private String msg;
    private Object data;
    private Integer code;
    public static R ok(Object data) {
        R r = new R();
        r.setData(data);
        r.setCode(200);
        r.setMsg("操作成功");
        return r;
    }
    public static R error(String msg) {
        R r = new R();
        r.setCode(500);
        r.setMsg(msg);
        return r;
    }
    public static R ok() {
        R r = new R();
        r.setCode(200);
        r.setMsg("操作成功");
        return r;
    }
}
